package com.eascs.admin.o2o.loan.dao;

import org.springframework.stereotype.Repository;
import com.eascs.admin.common.dao.BaseO2oDao;
import com.eascs.admin.o2o.loan.entity.BCRecommendationEntity;
import com.eascs.admin.o2o.loan.entity.BCRecommendationUpdateRecord;

/**
 *中行推荐函DAO
 */
@Repository
public class BCRecommendationDao extends BaseO2oDao{
	
	public int insertBCRecommendation(BCRecommendationEntity recommendationEntity){
		return this.o2oJdbcSession.insert(recommendationEntity);
	}
	
	public int updateBCRecommendation(BCRecommendationEntity recommendationEntity){
		return this.o2oJdbcSession.updateById(recommendationEntity);
	}

	public BCRecommendationEntity queryBCRecommendationByLoanNo(String loanNo){
		String sql="select * from o2o_recommendation_detail where loanapply_no=?";
		return this.o2oJdbcSession.findEntity(sql, BCRecommendationEntity.class, loanNo);
	}
	
	public int insertBCRecommendationRecord(BCRecommendationUpdateRecord recommendationRecord){
		return this.o2oJdbcSession.insert(recommendationRecord);
	}
	
}
